class RincosBean {
  int? id;
  String? pickUpDate;
  String? containerNo;
  int? pcs;
  String? incheonEtd;
  String? hketa;
  String? remarks;
  String? dateRange;
  String? createDate;

  RincosBean({
    this.id,
    this.pickUpDate,
    this.containerNo,
    this.pcs,
    this.incheonEtd,
    this.hketa,
    this.remarks,
    this.dateRange,
    this.createDate,
  });

  // 从Map对象创建RincosBean实例
  factory RincosBean.fromJson(Map<String, dynamic> json) {
    return RincosBean(
      id: json['id'],
      pickUpDate: json['pickUpDate'],
      containerNo: json['containerNo'],
      pcs: json['pcs'],
      incheonEtd: json['incheonEtd'],
      hketa: json['hketa'],
      remarks: json['remarks'],
      dateRange: json['dateRange'],
      createDate: json['createDate'],
    );
  }

  // 将RincosBean实例转换为Map对象
  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'pickUpDate': pickUpDate,
      'containerNo': containerNo,
      'pcs': pcs,
      'incheonEtd': incheonEtd,
      'hketa': hketa,
      'remarks': remarks,
      'dateRange': dateRange,
      'createDate': createDate,
    };
  }

  // 添加toJson方法，调用toMap方法
  Map<String, dynamic> toJson() {
    return toMap();
  }

  // 创建一个空的RincosBean实例
  RincosBean.empty() {
    DateTime now = DateTime.now();
    createDate = "${now.year}-${now.month.toString().padLeft(2, '0')}-${now.day.toString().padLeft(2, '0')}";
    pickUpDate = "";
    containerNo = "";
    pcs = 0;
    incheonEtd = "";
    hketa = "";
    remarks = "";
    dateRange = "";
  }
}
